<?php
$numfile = "data/number.txt";
$num = 0;
//if(!file_exists($numfile)) exit("File is not exist:$numfile");
if (@$fp = fopen($numfile, "r")) {
    $num = fgets($fp, 10);
    fclose($fp);
}
$num++;
$ff = fopen($numfile, "w");
fwrite($ff, $num);
fclose($ff);
$numArr = str_split($num);
echo "今日访问人数为：";
foreach ($numArr as $v) {
    printf("<img src='%s' alt='test' />", "images/counter1/counter_" . $v . ".gif");
}
